package nc.ui.acm.bd.manaccount;

import nc.itf.acm.pub.ACMInterface;
import nc.ui.trade.pub.IVOTreeDataByID;
import nc.vo.acm.bd.tradecorp.TradecorpVO;
import nc.vo.logging.Debug;
import nc.vo.pub.BusinessException;
import nc.vo.pub.SuperVO;

public class ManAccountTreeData implements IVOTreeDataByID {

	private String pk_corp = null;
	
	public ManAccountTreeData(String pk_corp) {
		super();
		this.pk_corp=pk_corp;
	}

	public String getIDFieldName() {
		return TradecorpVO.PK_TRADECORP;
	}

	public String getParentIDFieldName() {
		return TradecorpVO.PK_CORPPROP;
	}

	public String getShowFieldName() {
		return TradecorpVO.CODE;
	}

	public SuperVO[] getTreeVO() {
		SuperVO[] m_headVos = null;
		try {
			m_headVos=ACMInterface.getITradecorp().queryTradecorpVOs(pk_corp).toArray(new SuperVO[0]);
		} catch (BusinessException e) {
			Debug.error(e.getMessage());
		}
		return m_headVos;
	}

}
